package edu.wust;
//不超过400万的斐波拉契树偶数和
public class work002 {
    public static void main(String[] args) {
        var sum=0;
        int a[]=new int[10000];
        a[0]=1;a[1]=2;
        for(var i=2;i<10000;i++){
            a[i]=a[i-1]+a[i-2];
            if(a[i]>4000000)break;
            if(a[i]%2==0){
                sum+=a[i];
            }
        }
        System.out.println(sum+2);
    }
}
